<?php declare(strict_types=1);
namespace Umserv\ExchangeInterfaces\V1\Core\Dto;

/**
 * Базовая модель
 */
abstract class Base implements \Umserv\ExchangeInterfaces\V1\Core\Dto\BaseModelInterface
{
    /**
     * @inheritDoc
     */
    public function getAsArray(): array {
        return get_object_vars($this);
    }

    /**
     * @inheritDoc
     */
    public function getAsJson(): string {
        return json_encode($this->getAsArray(),JSON_UNESCAPED_SLASHES | JSON_HEX_QUOT);
    }
}